package com.echatim.dto;


import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;


@JsonIgnoreProperties(ignoreUnknown = true)
@NoArgsConstructor
@Accessors(chain = true)
@Data
public class HistorySessionDTO {
    private Long id = 0L; // 消息id
    private String fromUser = ""; // fromUser auid
    private String toTarget = ""; // toTarget auid
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
    private Date createTime = new Date(1); // 最后更新的时间撮
    private String fromUserName = ""; // fromUser 用户名字
    private String fromUserAvatar = ""; // fromUser 用户头像
    private String toTargetName = ""; // toTarget 用户名字
    private String toTargetAvatar = ""; // toTarget 用户头像
    private JSONObject body = new JSONObject(); // 消息内容
    private String type = ""; // 消息类型
    private Integer unread = 0; // 未读数
}
